package net.onecloud.onecloud.model;

import android.os.Parcel;
import android.os.Parcelable;

import java.util.ArrayList;
import java.util.List;

/**
 * Created by zaizai on 16/7/27.
 */
public class ResultEmploy implements Parcelable {


    private int code;
    private int success;
    private int more;
    private String message;
    private List<DataEntity> data;

    public int getCode() {
        return code;
    }

    public void setCode(int code) {
        this.code = code;
    }

    public int getSuccess() {
        return success;
    }

    public void setSuccess(int success) {
        this.success = success;
    }

    public String getMessage() {
        return message;
    }

    public void setMessage(String message) {
        this.message = message;
    }

    public int getMore() {
        return more;
    }

    public void setMore(int more) {
        this.more = more;
    }

    public List<DataEntity> getData() {
        return data;
    }

    public void setData(List<DataEntity> data) {
        this.data = data;
    }

    public static class DataEntity implements Parcelable {

        private String id;
        private String address;
        private String edate;
        private String pdate;
        private String enterprise_id;
        private String title;
        private String campany;

        public String getId() {
            return id;
        }

        public void setId(String id) {
            this.id = id;
        }

        public String getAddress() {
            return address;
        }

        public void setAddress(String address) {
            this.address = address;
        }

        public String getEdate() {
            return edate;
        }

        public void setEdate(String edate) {
            this.edate = edate;
        }

        public String getPdate() {
            return pdate;
        }

        public void setPdate(String pdate) {
            this.pdate = pdate;
        }

        public String getEnterprise_id() {
            return enterprise_id;
        }

        public void setEnterprise_id(String enterprise_id) {
            this.enterprise_id = enterprise_id;
        }

        public String getTitle() {
            return title;
        }

        public void setTitle(String title) {
            this.title = title;
        }

        public String getCampany() {
            return campany;
        }

        public void setCampany(String campany) {
            this.campany = campany;
        }

        @Override
        public int describeContents() {
            return 0;
        }

        @Override
        public void writeToParcel(Parcel dest, int flags) {
            dest.writeString(this.id);
            dest.writeString(this.address);
            dest.writeString(this.edate);
            dest.writeString(this.pdate);
            dest.writeString(this.enterprise_id);
            dest.writeString(this.title);
            dest.writeString(this.campany);
        }

        public DataEntity() {
        }

        protected DataEntity(Parcel in) {
            this.id = in.readString();
            this.address = in.readString();
            this.edate = in.readString();
            this.pdate = in.readString();
            this.enterprise_id = in.readString();
            this.title = in.readString();
            this.campany = in.readString();
        }

        public static final Creator<DataEntity> CREATOR = new Creator<DataEntity>() {
            @Override
            public DataEntity createFromParcel(Parcel source) {
                return new DataEntity(source);
            }

            @Override
            public DataEntity[] newArray(int size) {
                return new DataEntity[size];
            }
        };
    }

    @Override
    public int describeContents() {
        return 0;
    }

    @Override
    public void writeToParcel(Parcel dest, int flags) {
        dest.writeInt(this.code);
        dest.writeInt(this.success);
        dest.writeString(this.message);
        dest.writeList(this.data);
        dest.writeInt(this.more);
    }

    public ResultEmploy() {
    }

    protected ResultEmploy(Parcel in) {
        this.code = in.readInt();
        this.success = in.readInt();
        this.more = in.readInt();
        this.message = in.readString();
        this.data = new ArrayList<DataEntity>();
        in.readList(this.data, DataEntity.class.getClassLoader());
    }

    public static final Parcelable.Creator<ResultEmploy> CREATOR = new Parcelable.Creator<ResultEmploy>() {
        @Override
        public ResultEmploy createFromParcel(Parcel source) {
            return new ResultEmploy(source);
        }

        @Override
        public ResultEmploy[] newArray(int size) {
            return new ResultEmploy[size];
        }
    };
}
